const express = require("express");
const router = express.Router()

const user_handler = require("../router_handler/user.js")

// 第二步:调用 定义好的规则
const expressJoi = require("@escook/express-joi")
const {reg_login_schema} = require("../schema/user")

// 注册路由
router.post("/reguser",expressJoi(reg_login_schema),user_handler.register)

// 登录路由
router.post("/login",expressJoi(reg_login_schema),user_handler.login)


module.exports = router
